/*
package d11_test02;

import java.util.List;

public class Test02 {
    public static void main(String[] args) throws InterruptedException {
        //目标: 有一个抽奖池,该抽奖池中存放了奖励的金额,该抽奖池中的奖项为
        // {10,5,20,50,100,200,500,800,2,80,300,700};
        //1、創建一个容器存储,奖金
        int[] jackpot = {10, 5, 20, 50, 100, 200, 500, 800, 2, 80, 300, 700};
        List<Integer>
        int max = 0;
        int sum = 0;

        //2、创建两个线程,进行抽奖
        //2.1创建任务
        //注意这里要把,数组传输过去
        MyRunnable02 target = new MyRunnable02(jackpot);

        //2.2将创建的任务交给,线程对象
//        Thread luckyDrawBox = new Thread(target,"");
        Thread first = new Thread(target, "抽奖箱1");
        first.start();


        first.join();
        first.stop();
        //3、获取抽奖之后的集合
        List<Integer> prizes = target.getPrizes();
        System.out.println("抽奖箱1共产生了6个奖项,分别为:");
       */
/* for (Integer prize : prizes) {
            System.out.println(prize);
        }*//*

        for (int i = 0; i < prizes.size(); i++) {
            System.out.print(prizes.get(i) + ",");

            sum += prizes.get(i);
            //比较获取最大值


        }
        for (int i = 0; i < prizes.size()-1; i++){
            if (prizes.get(i) < prizes.get(i + 1)) {
                max = prizes.get(i + 1);
            }
        }

        //最后进行输出结果
        System.out.println("最高奖项是" + max + "总机额是:" + sum);
        Thread second = new Thread(target, "抽奖箱2");
        second.start();
        second.join();

        //3、获取抽奖之后的集合
        List<Integer> prizes1 = target.getPrizes();
        System.out.println("抽奖箱2共产生了6个奖项,分别为:");
       */
/* for (Integer prize : prizes) {
            System.out.println(prize);
        }*//*

        for (int i = 0; i < prizes1.size(); i++) {
            System.out.print(prizes1.get(i) + ",");
            sum += prizes1.get(i);
            //比较获取最大值


        }
        for (int i = 0; i < prizes1.size()-1; i++){
            if (prizes.get(i) < prizes.get(i + 1)) {
                max = prizes.get(i + 1);
            }
        }
        //最后进行输出结果
        System.out.println("最高奖项是" + max + "总机额是:" + sum);

//        List<String> box = target.getBox();
        //调用方法展示结构
//        showResult(prizes, box);
    }

    */
/*private static void showResult(List<Integer> prizes) {
        List<String> allPries = new ArrayList<>();
        //4、实现展示结果
        //4.1遍历集合,获取所有数据




        }
    }*//*

//}
}
*/
